#pragma once

#define ARCH_MAX_IRQ_NUM 256

#include "arch/riscv64/drivers/serial.h"
#include "arch/riscv64/drivers/timer.h"
#include "arch/riscv64/mm/arch.h"
#include "arch/riscv64/irq/ptrace.h"
#include "arch/riscv64/irq/irq.h"
#include "arch/riscv64/task/arch_context.h"
#include "arch/riscv64/time/time.h"
#include "arch/riscv64/smp.h"
#include "task/elf.h"
#include "arch/riscv64/syscall/syscall.h"

void arch_early_init();
void arch_init();

//  注意：在 RISC-V 中，nop 实际编码为 addi x0, x0, 0（写入零寄存器，无副作用）。 
static inline void arch_pause() { asm volatile("nop"); }

static inline void arch_wait_for_interrupt() { asm volatile("wfi"); }